package cn.cau.service.impl;

import cn.cau.dao.AuditingApplyRecordsDao;
import cn.cau.dao.CodeManageDao;
import cn.cau.dao.CodeRuleDao;
import cn.cau.entity.AuditingApplyRecord;
import cn.cau.entity.AuditingResult;
import cn.cau.entity.CodeManageRecord;
import cn.cau.entity.CodeRule;
import cn.cau.service.AuditingListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AuditingListServiceImpl implements AuditingListService {
    @Autowired
    private AuditingApplyRecordsDao applyRecordsDao;

    @Autowired
    private CodeRuleDao codeRuleDao;

    @Autowired
    private CodeManageDao codeManageDao;

    @Override
    public List<AuditingApplyRecord> getAllRecoreds() {
        return applyRecordsDao.findAllRecords();
    }

    @Override
    public List<CodeManageRecord> getAllUnDoRecord() {
        return codeManageDao.findAllUndoRecords();
    }

    @Override
    public List<CodeManageRecord> getAllDoRecord() {
        return codeManageDao.findAllDoRecords();
    }

    @Override
    public List<AuditingApplyRecord> getRecoredByStatus(int status) {
        return applyRecordsDao.findRecordsByStatus(status);
    }

    @Override
    public AuditingApplyRecord getRecoredById(int id) {
        return applyRecordsDao.findRecordsById(id);
    }

    @Override
    public CodeRule getReluById(int id) {
        return codeRuleDao.findCodeRuleById(id);
    }

    @Override
    public List<CodeManageRecord> findAllManageRecords() {
        return codeManageDao.findAllRecords();
    }

    @Override
    public CodeManageRecord findRecordByManageId(int ManageId) {
        return codeManageDao.findRecordByManageId(ManageId);
    }





}
